<?php

namespace app\common\model;

use think\Model;


class LihuaBonusActlog extends Model
{

    

    

    // 表名
    protected $table = 'lihua_bonus_actlog';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    /** *
     * 活动发送红包生成领取记录
        * {
        *   user_id => $uid,
        *   act_id => $act_id,
        *   createtime => $createtime,
        *   act_name => $act_name,
        *   type => $type,
        *   platform => $platform,
        * },
     **/
    public static function createlog($param = [])
    {
        if ($param && isset($param['user_id']) && isset($param['act_id'])) {
            try {
                $param['createtime_text'] = date('Y-m-d H:i:s');
                self::create($param);
            } catch (\Exception $e) {
                return false;
            }
            return true;
        }else{
            return false;
        }
    }
    

    







}
